import App from './App';
import 'http://at.alicdn.com/t/c/font_4449737_62bhnronlnx.js'
import PublicButton from '@/components/PublicButton.vue';
import StatusBar from '@/components/StatusBar.vue';
import uviewPlus from 'uview-plus'
import { createPinia } from 'pinia';
const store = createPinia();

// #ifndef VUE3
import Vue from 'vue';
import './uni.promisify.adaptor';
Vue.config.productionTip = false;
App.mpType = 'app';

const app = new Vue({
	...App,
});
app.$mount();

app.use(store);
app.use(uviewPlus);
uni.$u.config.unit = 'rpx';
app.component('PublicButton', PublicButton);
app.component('StatusBar', StatusBar);

// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue';
export function createApp() {
	const app = createSSRApp(App);
	app.use(store);
	app.use(uviewPlus);
	app.component('PublicButton', PublicButton);
	app.component('StatusBar', StatusBar);
	// 如此配置即可
	uni.$u.config.unit = 'rpx';
	return {
		app,
	};
}
// #endif
